#include "virt_gpio_led.h"

struct led_gpio_platform_data
{
	unsigned gpio;
	u8 active_low;
	u8 default_state;
	char *name;
	char *default_trigger;
};



static struct led_gpio_platform_data virt_gpio_led = {

	.name = "virt_led_pwm",
	.gpio = 259,
	.default_state	 = 0,
	.default_trigger = "none",
	.active_low = 0,

};





static void virtual_gpio_led_release(struct device *dev)
{

}
static struct platform_device virt_led_device = {
	.name = "led_gpio",
	.id = -1,
	.dev = {
		.platform_data = &virt_gpio_led,
		.release = virtual_gpio_led_release,
	}
};



static int __init virtual_gpio_led_init(void)
{
	int ret = 0;

	printk("%s:%d\n", __FUNCTION__, __LINE__);
	ret = platform_device_register(&virt_led_device);


	return ret;
}

static void __exit virtual_gpio_led_exit(void)
{
    printk("%s:%d\n", __FUNCTION__, __LINE__);
    platform_device_unregister(&virt_led_device);
}



module_init(virtual_gpio_led_init);
module_exit(virtual_gpio_led_exit);
MODULE_DESCRIPTION("Virtual GPIO Leds Device");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("jerry_chg");
